<html>
<head><meta charset="utf-8"><title>How to measure compile time of the compiler? · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/How.20to.20measure.20compile.20time.20of.20the.20compiler.3F.html">How to measure compile time of the compiler?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210803668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/How%20to%20measure%20compile%20time%20of%20the%20compiler%3F/near/210803668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> LingM <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/How.20to.20measure.20compile.20time.20of.20the.20compiler.3F.html#210803668">(Sep 21 2020 at 21:39)</a>:</h4>
<p>Hey,<br>
I submitted my first attempt at a <a href="https://github.com/rust-lang/rust/pull/76995">PR</a> yesterday. In response someone asked if my change affects the time it takes to compile the compiler. While I sure hope that's not the case, my intuition isn't exactly a reliable data point.<br>
Is there some canonical way to perform this measurement? From what I've seen perf runs only check how quickly the compiler builds things and not how fast it gets built itself.<br>
If there's no canonical way, could I maybe make use of the fact that the only change is a few macro calls? E.g. if macro expansion happens already for <code>./x.py check</code>, I could measure that. Doing two full builds with my machine would be a challenge at best.</p>



<a name="210807117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/How%20to%20measure%20compile%20time%20of%20the%20compiler%3F/near/210807117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/How.20to.20measure.20compile.20time.20of.20the.20compiler.3F.html#210807117">(Sep 21 2020 at 22:15)</a>:</h4>
<p>I really don't think your change would have a measurable impact on compile time.</p>



<a name="210807180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/How%20to%20measure%20compile%20time%20of%20the%20compiler%3F/near/210807180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/How.20to.20measure.20compile.20time.20of.20the.20compiler.3F.html#210807180">(Sep 21 2020 at 22:16)</a>:</h4>
<p>macro expansion does happen for <code>./x.py check</code> for what it's worth</p>



<a name="210807215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/How%20to%20measure%20compile%20time%20of%20the%20compiler%3F/near/210807215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/How.20to.20measure.20compile.20time.20of.20the.20compiler.3F.html#210807215">(Sep 21 2020 at 22:16)</a>:</h4>
<p>also for future reference, <a class="stream" data-stream-id="182449" href="/#narrow/stream/182449-t-compiler.2Fhelp">#t-compiler/help</a> is the best place for questions like this!</p>



<a name="210808027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/How%20to%20measure%20compile%20time%20of%20the%20compiler%3F/near/210808027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> LingM <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/How.20to.20measure.20compile.20time.20of.20the.20compiler.3F.html#210808027">(Sep 21 2020 at 22:26)</a>:</h4>
<p>Thanks! Will keep that other stream in mind for the future.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>